:: [a] -> [a] -> Bool package:base

The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.
>>> "Hello" `isPrefixOf` "Hello World!"
True

>>> "Hello" `isPrefixOf` "Wello Horld!"
False
For the result to be True, the first list must be finite; False, however, results from any mismatch:
>>> [0..] `isPrefixOf` [1..]
False

>>> [0..] `isPrefixOf` [0..99]
False

>>> [0..99] `isPrefixOf` [0..]
True

>>> [0..] `isPrefixOf` [0..]
* Hangs forever *
The isSuffixOf function takes two lists and returns True iff the first list is a suffix of the second.
>>> "ld!" `isSuffixOf` "Hello World!"
True

>>> "World" `isSuffixOf` "Hello World!"
False
The second list must be finite; however the first list may be infinite:
>>> [0..] `isSuffixOf` [0..99]
False

>>> [0..99] `isSuffixOf` [0..]
* Hangs forever *
The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second.
>>> isInfixOf "Haskell" "I really like Haskell."
True

>>> isInfixOf "Ial" "I really like Haskell."
False
For the result to be True, the first list must be finite; for the result to be False, the second list must be finite:
>>> [20..50] `isInfixOf` [0..]
True

>>> [0..] `isInfixOf` [20..50]
False

>>> [0..] `isInfixOf` [0..]
* Hangs forever *
The isSubsequenceOf function takes two lists and returns True if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively. isSubsequenceOf x y is equivalent to elem x (subsequences y).
>>> isSubsequenceOf "GHC" "The Glorious Haskell Compiler"
True

>>> isSubsequenceOf ['a','d'..'z'] ['a'..'z']
True

>>> isSubsequenceOf [1..10] [10,9..0]
False
For the result to be True, the first list must be finite; for the result to be False, the second list must be finite:
>>> [0,2..10] `isSubsequenceOf` [0..]
True

>>> [0..] `isSubsequenceOf` [0,2..10]
False

>>> [0,2..] `isSubsequenceOf` [0..]
* Hangs forever*